<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <link rel="icon" type="image/png" href="assets/img/favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    <title>Home</title>

    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'/>
    <meta name="viewport" content="width=device-width"/>


    <!-- Bootstrap core CSS     -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>

    <!-- Animation library for notifications   -->
    <link href="assets/css/animate.min.css" rel="stylesheet"/>

    <!--  Light Bootstrap Table core CSS    -->
    <link href="assets/css/light-bootstrap-dashboard.css" rel="stylesheet"/>


    <!--  CSS for Demo Purpose, don't include it in your project     -->
    <link href="assets/css/demo.css" rel="stylesheet"/>


    <!--     Fonts and icons     -->
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
    <link href="assets/css/pe-icon-7-stroke.css" rel="stylesheet"/>
    <script src="js/axios.min.js"></script>
    <script src="js/query.js"></script>

    <script>
        var loginUser1;
        window.onload = function () {
            getUser();
        }

        function getUser() {
            axios.get("/user/getUser").then(resp => {
                loginUser1 = resp.data;
                console.log(loginUser1);
                if (loginUser1.grade === "超级管理员") {
                    $n("xsgl").style.visibility = "visible";
                    $n("yhgl").style.visibility = "visible";
                    $n("bjgl").style.visibility = "visible";
                    $n("fjxx").style.visibility = "visible";
                } else if (loginUser1.grade === "班主任") {
                    $n("xsgl").style.visibility = "visible";
                    $n("bjgl").style.visibility = "visible";
                } else if (loginUser1.grade === "系统管理员") {
                    $n("yhgl").style.visibility = "visible";
                }
            })
        }


    </script>
</head>
<body>

<div class="wrapper">
    <div class="sidebar" data-color="purple" data-image="assets/img/sidebar-5.jpg">

        <!--

            Tip 1: you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple"
            Tip 2: you can also add an image using data-image tag

        -->

        <div class="sidebar-wrapper">
            <div class="logo">
                <a class="simple-text">
                    宿舍管理系统
                </a>
            </div>

            <ul class="nav">
                <li style="visibility: hidden" id="xsgl">
                    <a href="student.html" target="contentFrame">
                        <i class="pe-7s-graph"></i>
                        <p>学生管理</p>
                    </a>
                </li>
                <li style="visibility: hidden" id="bjgl">
                    <a href="class.html" target="contentFrame">
                        <i class="pe-7s-user"></i>
                        <p>班级管理</p>
                    </a>
                </li>
                <li style="visibility: hidden" id="fjxx">
                    <a href="room.html" target="contentFrame">
                        <i class="pe-7s-note2"></i>
                        <p>房间信息</p>
                    </a>
                </li>
                <li style="visibility: hidden" id="yhgl">
                    <a href="user.html" target="contentFrame">
                        <i class="pe-7s-news-paper"></i>
                        <p>用户管理</p>
                    </a>
                </li>
                <li>
                    <a href="change.html" target="contentFrame">
                        <i class="pe-7s-science"></i>
                        <p>修改密码</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>


    <div class="main-panel">

        <!--内容-->
        <iframe class="content" name="contentFrame" style=" width: 900px;height: 600px">


        </iframe>

    </div>

</div>


<!--底部-->
<footer class="footer">

</footer>


</body>

<!--   Core JS Files   -->
<script src="assets/js/jquery-1.10.2.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript"></script>

<!--  Checkbox, Radio & Switch Plugins -->
<script src="assets/js/bootstrap-checkbox-radio-switch.js"></script>

<!--  Charts Plugin -->
<!--<script src="assets/js/chartist.min.js"></script>-->

<!--  Notifications Plugin    -->
<script src="assets/js/bootstrap-notify.js"></script>

<!--  Google Maps Plugin    -->
<!---<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>--->

<!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
<script src="assets/js/light-bootstrap-dashboard.js"></script>

<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
<!--<script src="assets/js/demo.js"></script>-->

<!--<script type="text/javascript">-->
<!--    $(document).ready(function () {-->

<!--        demo.initChartist();-->

<!--        $.notify({-->
<!--            icon: 'pe-7s-gift',-->
<!--            message: "Welcome to <b>Light Bootstrap Dashboard</b> - a beautiful freebie for every web developer."-->

<!--        }, {-->
<!--            type: 'info',-->
<!--            timer: 4000-->
<!--        });-->

<!--    });-->
<!--</script>-->

</html>
